Skip to content

Conversation

danehans
Copy link
Contributor

What type of PR is this?
/kind documentation
/kind feature

What this PR does / why we need it:

  • Adds the v1alpha1 Go types for multi-cluster inferencepool.
  • Runs the generators.
  • Adds the API docs.

Which issue(s) this PR fixes:

Fixes #1654

Does this PR introduce a user-facing change?:

Adds initial Go types and API docs for v1alpha1 multi-cluster InferencePools.

@k8s-ci-robot k8s-ci-robot added kind/documentation Categorizes issue or PR as related to documentation. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 26, 2025
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 26, 2025
Copy link

netlify bot commented Sep 26, 2025

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit 754b64b
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/68e43aae2d891c000813ca98
😎 Deploy Preview https://deploy-preview-1658--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Sep 26, 2025
@danehans
Copy link
Contributor Author

Hold until #1374 is merged.

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 26, 2025
@danehans
Copy link
Contributor Author

cc: @robscott @bexxmodd

//
// Controllers MAY raise this condition with other reasons, but should
// prefer to use the reasons listed above to improve interoperability.
InferencePoolConditionExported InferencePoolConditionType = "Exported"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the value for a non-exported InferencePool? "Invalid" doesn't sound right IMO

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah +1, Added some suggested reasons above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are a few other options we can take:

  1. Do not define the reason at this time and leave it up to the implementation to surface.
  2. Rename "Invalid" to "Unknown" or "ApplyFailed" and require a message to be set with additional details.
  3. Proceed with https://github.com/kubernetes-sigs/gateway-api-inference-extension/pull/1658/files#r2383650354 recommendations.

WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit f0fbeb9 proceeds with option 3 above.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the recommendations in 3. If the InferencePool has not been exported, then that should be clear

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@keithmattix commit f0fbeb9 proceeds with option 3, PTAL.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @danehans! This mostly LGTM. I'm going to be OOO for the next few days but please feel free to go ahead and move forward with this once my comments are resolved. @bexxmodd can also help with the reviews here. I'm sure we'll still have some things to tweak after we merge this, but I'd rather get something in soon so we can start on the implementation side.

//
// Controllers MAY raise this condition with other reasons, but should
// prefer to use the reasons listed above to improve interoperability.
InferencePoolConditionExported InferencePoolConditionType = "Exported"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah +1, Added some suggested reasons above.

@danehans danehans force-pushed the issue_1654 branch 2 times, most recently from f0fbeb9 to ac3dc45 Compare September 29, 2025 23:21
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 29, 2025
}

// InferencePoolImportStatus defines the observed state of the InferencePoolImport.
type InferencePoolImportStatus struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have some field like this in here? https://github.com/kubernetes-sigs/gateway-api/blob/530c1ee46e0d851d369810e4500f0339c40d8aa1/apis/v1/gateway_types.go#L1022

This can be useful for some implementation specific metadata propagation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bexxmodd adding ^ would modify the proposal. I can potentially see differing views on how this metadata should be propagated. If this important to you, can you create an issue or link it to here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SG. I'll create a new issue.

Copy link
Contributor Author

@danehans danehans Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bexxmodd when you have a moment, please link the issue here and resolve this conversation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/link #1674

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 30, 2025
Copy link
Contributor

@keithmattix keithmattix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm - thanks Daneyon!

@keithmattix
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 30, 2025
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 2, 2025
@bexxmodd
Copy link
Contributor

bexxmodd commented Oct 3, 2025

/LGTM /Approve thanks @danehans

@danehans
Copy link
Contributor Author

danehans commented Oct 3, 2025

Tagging since the latest commit resolves @robscott feedback and multiple reviewers tagged.

/lgtm

@k8s-ci-robot
Copy link
Contributor

@danehans: you cannot LGTM your own PR.

In response to this:

Tagging since the latest commit resolves @robscott feedback and multiple reviewers tagged.

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@robscott
Copy link
Member

robscott commented Oct 3, 2025

Thanks @danehans!

/lgtm
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 3, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 3, 2025
//
// +required
//nolint:kubeapilinter // should not have omitempty since the field is required
ControllerName ControllerName `json:"controllerName"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make these changes in a v1alpha3 inferencepool? I'm concerned about fullsending changes to v1 on the first iteration.

Cc: @robscott @ahg-g

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make this field optional so the change is backwards-compatible, but other than that, there's plenty of precedence for this field existing in GW API statuses. It was an accidental omission from the v1 API.

As far as the mechanics of API versions - we'd actually have to create v2alpha1 if we wanted to make breaking changes. In Gateway API, we created an "experimental" channel that allows us to gate fields like this by only including them in experimental CRDs (conceptually similar to feature gates in k/k). While I think that's inevitable here, I personally don't think this change is large enough to justify creating the separate release channel.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

@robscott
Copy link
Member

robscott commented Oct 3, 2025

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 3, 2025
Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @danehans!

//
// +required
//nolint:kubeapilinter // should not have omitempty since the field is required
ControllerName ControllerName `json:"controllerName"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make this field optional so the change is backwards-compatible, but other than that, there's plenty of precedence for this field existing in GW API statuses. It was an accidental omission from the v1 API.

As far as the mechanics of API versions - we'd actually have to create v2alpha1 if we wanted to make breaking changes. In Gateway API, we created an "experimental" channel that allows us to gate fields like this by only including them in experimental CRDs (conceptually similar to feature gates in k/k). While I think that's inevitable here, I personally don't think this change is large enough to justify creating the separate release channel.

@kfswain
Copy link
Collaborator

kfswain commented Oct 6, 2025

/lgtm

I think we should address:

We should make this field optional so the change is backwards-compatible

But otherwise everything sounds good

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 6, 2025
@danehans
Copy link
Contributor Author

danehans commented Oct 6, 2025

754b64b makes ControllerName optional and updates the godocs for this field.

Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @danehans!

// Name of the exporting cluster (must be unique within the list).
//
// +kubebuilder:validation:Required
Name ClusterName `json:"name"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was chatting with @bexxmodd about this earlier today and he pointed out that we likely also need some basic information about the EPP in each cluster here. I think this can/should be an additive change, so don't want to block this PR for this, just raising it as an addition that would be helpful.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could also be useful to store some per-cluster metadata beyond name, maybe conceptually similar to the infrastructure field we have on Gateway. Again, not a blocker, but probably worth a follow up PR if @bexxmodd can squeeze it in.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bexxmodd, danehans, robscott

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kfswain
Copy link
Collaborator

kfswain commented Oct 7, 2025

/unhold

Thanks!

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 7, 2025
@robscott
Copy link
Member

robscott commented Oct 7, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 7, 2025
@k8s-ci-robot k8s-ci-robot merged commit 67ad182 into kubernetes-sigs:main Oct 7, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/documentation Categorizes issue or PR as related to documentation. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi-Cluster: Add Go Types
6 participants